/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.employee.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.employee.entity.StoreBonusSettingTemplateProduct;

/**
 * 产品销售提成设定DAO接口
 * @author liujiang
 * @version 2013-11-19
 */
public interface StoreBonusSettingTemplateProductDao extends StoreBonusSettingTemplateProductDaoCustom, CrudRepository<StoreBonusSettingTemplateProduct, Long> {
	@Query("select cs.product_category_id from StoreBonusSettingTemplateProduct cs where cs.store.id = ?1 and cs.product_type=?2 and cs.card_type=?3")
	public List<Long> getExistTemplateId(Long storeId, int productType, int cardType);
}

/**
 * DAO自定义接口
 * @author liujiang
 */
interface StoreBonusSettingTemplateProductDaoCustom extends BaseDao<StoreBonusSettingTemplateProduct> {

}

/**
 * DAO自定义接口实现
 * @author liujiang
 */
@Component
class StoreBonusSettingTemplateProductDaoImpl extends BaseDaoImpl<StoreBonusSettingTemplateProduct> implements StoreBonusSettingTemplateProductDaoCustom {

}
